﻿/*
 * Created by SharpDevelop.
 * User: fred
 * Date: 9/09/2011
 * Time: 20:46
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.AddIn.Pipeline;
using System.Collections.Generic;

using MetaVideoEditorEvolved.AddIn.Contracts;
using MetaVideoEditorEvolved.AddIn.Entity;
using MetaVideoEditorEvolved.AddIn.HostViews;

namespace MetaVideoEditorEvolved.AddIn.HostAdapters
{
	[HostAdapter]
	public class ProviderAdapter : ProviderView
	{
		private Contracts.IProviderContract providerContract;
		private System.AddIn.Pipeline.ContractHandle handle;
		
		public ProviderAdapter(IProviderContract providerContract)
		{
			this.providerContract = providerContract;
			
			handle = new ContractHandle(providerContract);
		}

		public override List<ProviderSearchResult> FindPossible(ProviderSearchRequest request)
		{
			return this.providerContract.FindPossible(request);
		}
		
		public override Movie FetchMovie(int movieId)
		{
			return this.providerContract.FetchMovie(movieId);
		}
		
		public override Episode FetchEpisode(string serieId, int seasonNumber, int episodeNumber)
		{
			return this.providerContract.FetchEpisode(serieId, seasonNumber, episodeNumber);
		}
		
		public override Season FetchSeason(string serieId, int seasonNumber)
		{
			return this.providerContract.FetchSeason(serieId, seasonNumber);
		}
		
		public override Serie FetchSerie(string serieId)
		{
			return this.providerContract.FetchSerie(serieId);
		}
		
		public override void ShowOption()
		{
			this.providerContract.ShowOption();
		}
		
		public override bool HasOption()
		{
			return this.providerContract.HasOption();
		}
	}
}
